<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>arcgis api for js3.x</title>

    <!-- <link rel="stylesheet" href="https://js.arcgis.com/3.34/dijit/themes/claro/claro.css" /> -->
    <link rel="stylesheet" href="https://js.arcgis.com/3.34/esri/css/esri.css" />

    <link rel="stylesheet" href="http://localhost/3.34/3.34/esri/css/esri.css">
    <script src="http://localhost/3.34/3.34/init.js"></script>

    <style>
        html,
        body,
        #map {
            height: 100%;
            margin: 0;
            padding: 0;
        }
    </style>
    <script>
        require([
            "dojo/ready",
            "dojo/parser",
            "esri/map",
            "esri/layers/FeatureLayer",
            "esri/dijit/analysis/ConnectOriginsToDestinations",
            "esri/InfoTemplate",
            "dijit/layout/BorderContainer",
            "dijit/layout/ContentPane",
            "dojo/domReady!"
        ], function(
            ready,
            parser,
            Map,
            FeatureLayer,
            ConnectOriginsToDestinations,
            InfoTemplate
        ) {
            var map = new Map("map", {
                basemap: "osm",
                //center: [-117.76, 34.06],
                center: [119.386931, 25.612847],
                zoom: 11
            });
            //var originsLayer = new FeatureLayer("https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/origins/FeatureServer/0");
            var originsLayer1 = new FeatureLayer("http://fqghj.net:8887/arcgis/rest/services/ZQXM_2018/MapServer", {
                mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,
                outFields: ["*"]　 //显示所有字段
            });
            // var destinationsLayer = new FeatureLayer("https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/destinations_fs/FeatureServer/0", {
            //     name: "destinations",
            //     outFields: ["*"]
            // });
            //map.addLayers([originsLayer, destinationsLayer]);
            map.addLayer(originsLayer1, 8);
            map.on("click", function(result) {
                console.log(result);
            });

        });
    </script>
</head>


<body>
    <div id="map"></div>
    <!-- <div id="border-container" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline',gutters:false">
        <div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'" style="padding: 0;">
        </div>
        <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'left'" style="width: 300px;">
            <div id="toolPane">
            </div>
        </div>
    </div> -->



    <div id="bhdisplay" style="display: none;">
        <tr style="background-color: chartreuse;">
            <th>管线类型</th>
            <th>缺陷名称</th>
            <th>缺陷类别</th>
            <th>缺陷等级</th>
            <th>是否修复</th>
            <th>查看缺陷处的图片</th>
        </tr>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
    </div>

</body>

</html>